﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Xajhzwb.Components.Data;
using Xajhzwb.Components.Util;

namespace Xajhzwb
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private void configToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormConfig formConfig = new FormConfig();
            formConfig.ShowDialog();
        }

        private void postToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormPublish formPublish = new FormPublish();
            formPublish.Show();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }


        private void InitForm()
        {
            try
            {
                this.treeMenu.ExpandAll();

                this.webBrowser.Navigate("http://www.yijie.net/softini.html");

                // load task treeview

                // set language

                // set the default treeview with isrunning




            }
            catch (Exception ex)
            {

            }
        }

        private void loadTreeView()
        {
            List<ClassData> classDataList = DataHelper.GetClassNameList(Const.ClassType.Plan.ToString());
            if(classDataList != null && classDataList.Count > 0)
            {
                foreach(ClassData classData in classDataList)
                {
                    TreeNode cTreeNode = new TreeNode();
                    //cTreeNode

                }

            }

        }



    }
}
